package com.xuxin.baby.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.xuxin.baby.R;
import com.xuxin.baby.bean.NoticeBean;
import com.xuxin.baby.utils.BaseUtils;

import org.jetbrains.annotations.NotNull;

/**
 * Created by xu_xin
 * Created on 2020.08.05 0005
 * 通知提醒
 */
public class UserNoticeAdapter extends BaseQuickAdapter<NoticeBean.ResultBean.ItemsBean, BaseViewHolder> {

    public UserNoticeAdapter() {
        super(R.layout.item_user_notice);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder holder, NoticeBean.ResultBean.ItemsBean item) {
        holder.setText(R.id.item_user_notice_time, BaseUtils.getTime(item.getCreationTime()));
        holder.setText(R.id.item_user_notice_title, item.getTitle());
        holder.setText(R.id.item_user_notice_content, item.getContents());
    }
}